﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ThreeByte.ActiveDeck.Config;

namespace ThreeByte.ActiveDeck.Controls
{
    /// <summary>
    /// Interaction logic for QuestionConfiguration.xaml
    /// </summary>
    public partial class QuestionConfiguration : UserControl
    {

        private QuestionConfig qConfig;

        public QuestionConfiguration(PageConfig config){
            InitializeComponent();

            qConfig = (QuestionConfig)config;
            DataContext = config;
        }

        private void SnapshotButton_Click(object sender, RoutedEventArgs e) {
            //Grab the current slide theme and then export --> import
            PageConfig config = (PageConfig)DataContext;

        }

        private void AnswerButton_Click(object sender, RoutedEventArgs e) {
            //Open the Config page here

            //Show QuestionFeedback dialog
            QuestionFeedbackControl newFeedbackControl = new QuestionFeedbackControl(qConfig);
            HostForm newDialog = new HostForm(newFeedbackControl);
            if(newDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
                //TODO: Commit this if allowing reversion?
            }


        }

    }
}
